define(['ionic', 'ionicU9', 'ngMessages', 'js/controllers', 'js/services', 'js/utility'], function () {

    angular.module('BUSContacts', ['ionic', 'ionicU9', 'ngMessages', 'BUSContacts.controllers', 'BUSContacts.services', 'BUSContacts.utility'])

        .run(function () {
            u9.hideLoading();
        })

        .config(['$stateProvider', '$urlRouterProvider', '$ionicConfigProvider',
            function ($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
                $stateProvider
                    .state('home', {
                        url: '/home',
                        templateUrl: 'tpls/home.html',
                        controller: 'HomeCtrl'
                    })
                    .state('detail', {
                        url: '/detail?userId:source',
                        templateUrl: 'tpls/detail.html',
                        controller: 'DetailCtrl'
                    });
                $urlRouterProvider.otherwise('/home');

                $ionicConfigProvider.platform.android.navBar.alignTitle('center');
                $ionicConfigProvider.platform.android.backButton.previousTitleText(false);
                $ionicConfigProvider.platform.android.navBar.transition('view');
                $ionicConfigProvider.platform.android.views.transition('ios');
                $ionicConfigProvider.platform.android.views.swipeBackEnabled(true);
                $ionicConfigProvider.platform.android.views.swipeBackHitWidth(45);
                $ionicConfigProvider.platform.android.tabs.style('standard');
                $ionicConfigProvider.platform.android.tabs.position('bottom');
                $ionicConfigProvider.platform.android.form.toggle('large');

                $ionicConfigProvider.platform.default.backButton.previousTitleText(false);
                $ionicConfigProvider.platform.default.backButton.text(false);
            }
        ]);
});